package sqlutil.bean;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

@Table(name = "t_taskgroup")
public class TaskGroup {
	
	@Id
	@Column(name = "id")
    private String id;

	@Column(name = "groupname")
    private String groupname;
	
    @ManyToMany()
    @JoinTable( name="t_task_group_rel",	//关联表名
    		joinColumns={@JoinColumn(name="group_id")},	//关联表本端的 外键列名
    		inverseJoinColumns={@JoinColumn(name="task_id")}	//关联表另一端的 外键列名
    )
	private Task task ;
	
    public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getGroupname() {
		return groupname;
	}

	public void setGroupname(String groupname) {
		this.groupname = groupname;
	}

	public Task getTask() {
		return task;
	}

	public void setTask(Task task) {
		this.task = task;
	}

}
